<?php
$page = "";
if ($record_count >0){
	$page = onegate_pagebreak_selectbox_vunh($total_record,$v_page,$v_limit_row,$fuseaction,"form_id_".$user_id) ."&nbsp;". onegate_change_record_number_page_vunh($v_limit_row,$fuseaction,"form_id_".$user_id)
	;			
}
if ($_REQUEST['modal_dialog_mode'] == 1) {
	$template->set_filenames(array("body"=>"template/view_one_user.tpl"));
} else {
	$template->set_filenames(array("body"=>"template/view_one_user_content.tpl"));
}
$template->assign_block_vars("login_info_user", array(
		"div_id"=>"div_id_".$user_id,
		"form_id"=>"form_id_".$user_id,
		"fuseaction"=>$fuseaction,
		"hdn_page"=>$v_total_record,
		"hdn_record_number_page"=>$v_page,
		"parent_id"=>$id_unit,
		"id"=>$user_id,
		"user_name"=>$user_name,
		"page"=>$page,
		"content_id"=>"content_id_".$user_id
	));
for ($i=0; $i<$record_count; $i++) {
	if ($v_current_style_name == "odd_row"){
		$v_current_style_name = "round_row";
	}else{
		$v_current_style_name = "odd_row";
	}			
	$template->assign_block_vars("login_info_user.login_info_row", array(
		"STT"=>$i + 1 + ($v_limit_row * ($v_page - 1)),
		//-------begin---nieuvv--090608----------- lay ten va ngay dang nhap--------------
		"Date"=>$arr_all_record[$i]["C_DAY"]."-".$arr_all_record[$i]["C_MONTH"]."-".$arr_all_record[$i]["C_YEAR"],
		"User"=>_get_item_attr_by_id($_SESSION['arr_all_staff'],$arr_all_record[$i]["FK_USER"],'name'),
		//---------- the end nieuvv-----------------------------	
		"IP"=>$arr_all_record[$i]["C_IP"],
		"Time"=>$arr_all_record[$i]["C_HOUR"].":".$arr_all_record[$i]["C_MINUTE"].":".$arr_all_record[$i]["C_SECOND"],
		"class_row"=>$v_current_style_name
	));
}		
if ($record_count < $v_limit_row) {
	for ($i=$record_count; $i<$v_limit_row; $i++) {
		if ($v_current_style_name == "odd_row"){
		$v_current_style_name = "round_row";
	}else{
		$v_current_style_name = "odd_row";
	}
	$template->assign_block_vars("login_info_user.login_info_row", array(
		"STT"=>$i + 1 + ($v_limit_row * ($v_page - 1)),
		"Date"=>"&nbsp;",
		"User"=>"&nbsp;",
		"IP"=>"&nbsp;",
		"Time"=>"&nbsp;",
		"class_row"=>$v_current_style_name
	));
	}
}		

if ($use_page_or_row_limit) {
	$template->pparse("body");		
}
else {
	$template->pparse("body");
}
?>